package com.bw.module_parking.view

import android.os.Bundle
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.bw.module_parking.R

/**
 * 智慧园区-02-编辑车位-v1.1-曲烨-20250509
 */
class AddParkingActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_add_parking)

        val car_back = findViewById<ImageView>(R.id.car_back)
        val tv_leisure = findViewById<TextView>(R.id.tv_leisure)
        val tv_occupied = findViewById<TextView>(R.id.tv_occupied)
        val tv_maintain = findViewById<TextView>(R.id.tv_maintain)

        car_back.setOnClickListener {
            finish()
        }



        tv_leisure.setOnClickListener {
            tv_leisure.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text2)
            tv_occupied.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
            tv_maintain.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
        }

        tv_occupied.setOnClickListener {
            tv_leisure.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
            tv_occupied.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text2)
            tv_maintain.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
        }


        tv_maintain.setOnClickListener {
            tv_leisure.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
            tv_occupied.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text)
            tv_maintain.setBackgroundResource(com.bw.lib_common.R.drawable.bg_edit_text2)
        }
    }
}